<?php 
class HomeController extends Controller{
	/**
	 * 用户主页
	 */
	public function actionIndex(){
		if(Yii::app()->user->isGuest){
			Yii::app()->user->setFlash('home', '请先登录吧.');
			return Yii::app()->runController('member/login');
		}
		$model = 'Member';
		if(!($user = CActiveRecord::model($model)->findByPk(Yii::app()->user->id))){
			$this->showError('你确定你登录了?怎么没有你的记录呀..要不..你再重新登录下吧...');
		}
		$this->render('index', array(
			'user' => $user
		));
	}
	
	public function actionProfile(){
		
	}
}
?>